#!/bin/sh

COMM_DIST=../dist
mkdir -p ${COMM_DIST}/bin

cd lib/apmcomm

cd ../apmcomm/;make clean;make DEFINE_C=true || exit "$?"; make DEFINE_C=true install || exit "$?";rm -f *.o;make || exit "$?";make install || exit "$?";
cd ../apmmodule/;make prepare; make clean;make || exit "$?";make install || exit "$?"
cd ../apm4lua/;make clean;make || exit "$?";make install || exit "$?"
cd ../apmshm/;make clean;make || exit "$?";make install || exit "$?"
cd ../report; make clean;make DEFINE_NO_SEND=true || exit "$?"; make DEFINE_NO_SEND=true install || exit "$?"; rm -f *.o; make || exit "$?"; make install || exit "$?"
cd ../../

cd exec/framework; make clean;make || exit "$?";make install || exit "$?"
cd ../client; make clean;make || exit "$?";make install || exit "$?"
cd ../dssl; make clean;make || exit "$?";make install || exit "$?"
cd ../shm_mng; make clean;make || exit "$?";make install || exit "$?"

cd ../../

